package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.GroupCityExample.E_CITY_CODE;
import static org.jsola.hr.example.GroupCityExample.E_CITY_NAME;
import static org.jsola.hr.example.GroupCityExample.E_GROUP_ID;
import static org.jsola.hr.example.GroupCityExample.E_IS_ALL;
import static org.jsola.hr.example.GroupCityExample.E_PROPS;
import static org.jsola.hr.example.GroupCityExample.M_CITY_CODE_MAX;
import static org.jsola.hr.example.GroupCityExample.M_CITY_CODE_NOT_NULL;
import static org.jsola.hr.example.GroupCityExample.M_CITY_NAME_MAX;
import static org.jsola.hr.example.GroupCityExample.M_CITY_NAME_NOT_NULL;
import static org.jsola.hr.example.GroupCityExample.M_GROUP_ID_MAX;
import static org.jsola.hr.example.GroupCityExample.M_GROUP_ID_NOT_NULL;
import static org.jsola.hr.example.GroupCityExample.M_PROPS_MAX;
import static org.jsola.hr.example.GroupCityExample.N_CITY_CODE;
import static org.jsola.hr.example.GroupCityExample.N_CITY_NAME;
import static org.jsola.hr.example.GroupCityExample.N_GROUP_ID;
import static org.jsola.hr.example.GroupCityExample.N_IS_ALL;
import static org.jsola.hr.example.GroupCityExample.N_PROPS;

/**
 * 子公司分管城市关系表
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【子公司分管城市关系表】的参数")
@Data
public class GroupCityAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_GROUP_ID, example = E_GROUP_ID)
    @Length(max = 32, message = M_GROUP_ID_MAX)
    private String groupId;

    @ApiModelProperty(notes = N_CITY_CODE, example = E_CITY_CODE, required = true)
    @NotNull(message = M_CITY_CODE_NOT_NULL)
    @Length(max = 50, message = M_CITY_CODE_MAX)
    private String cityCode;

    @ApiModelProperty(notes = N_CITY_NAME, example = E_CITY_NAME, required = true)
    @NotNull(message = M_CITY_NAME_NOT_NULL)
    @Length(max = 100, message = M_CITY_NAME_MAX)
    private String cityName;

    @ApiModelProperty(notes = N_PROPS, example = E_PROPS)
    @Length(max = 2147483647, message = M_PROPS_MAX)
    private String props;

    @ApiModelProperty(notes = N_IS_ALL, example = E_IS_ALL)
    private Boolean isAll;


}

